package cc.ailley.proxy.statics;

import cc.ailley.proxy.IUserDao;

/**
 * 静态代理
 *
 * @author ailley
 */
public class IUserDaoStaticProxy implements IUserDao{

    private IUserDao target;

    public IUserDaoStaticProxy(IUserDao target) {
        this.target = target;
    }

    @Override
    public void save() {
        System.out.println("开启事务");
        target.save();
        System.out.println("结束事务");
    }
}
